package com.hyj.ecp.backstage.statistics.action;

import java.io.IOException;
import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ecp.cust.ClientUserQO;
import com.ecp.goods.GoodsTypeQO;
import com.hyj.ecp.backstage.statistics.bean.CustMonthQO;
import com.hyj.ecp.backstage.statistics.service.ICustStatisticsService;

@Controller
@RequestMapping("/backstage/statistics/cust/*")
public class CustStatisticsAction {
	Log logger = LogFactory.getLog(CustStatisticsAction.class);

	@Autowired
    private ICustStatisticsService service;
	
	
	@RequestMapping(value="toCustMonth.do")
    public String togoodstype(GoodsTypeQO qo,ModelMap map) throws IOException
    {
    	logger.info("toCustMonth.do...");
		return "view/backstage/statistics/custMonth";
    }
	
	@ResponseBody
	@RequestMapping(value="queryCustMonth.do")
    public Object queryCustMonth(HttpServletRequest request,CustMonthQO qo) throws UnsupportedEncodingException
    {
		logger.info("queryCustMonth.do  start...");
		return service.queryCustMonth(qo).getBytes("UTF-8");
    }
}
